home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun 1990 Summer
/
rerun-1990-summer.d64
/
address manager
(
.txt
)
next >
Wrap
Commodore BASIC
|
2022-09-20
|
8KB
|
214 lines
1 print"[147]would you like installation instructions
2 [153]"y/n?
3 geta$:if a$=""then 3
4 if a$="n" then 100
10 print"[147] to use address manager, copy it to
20 [153]"a work disk. you can do that now by
25 print"pressing run/stop-restore, placing a
26 [153]"work disk in the drive and typing:
27 print"save "chr$(34)"address manager"chr$(34)",8:
30 [153]"then run graphics prg and data program
40 print"from this summer rerun disk. you need
50 [153]"address manager, graphics file and data
60 print"file on a work disk in order to use
70 [153]"this program.":[153]" press a key
80 get a$:if a$="" then 80
100 rem "address manager" version 4.0 by ralph h. rethoret revised april 1990
110 poke53280,0:poke53281,0:poke646,5:poke650,64:print""
120 print"[147] [196]ata loading..."chr$(14)
130 dimzo$(162),zo%(162),na$(162),ns$(162),ci$(162)
140 dimpc$(162),co$(162),ph$(162),g$(162),so$(162)
150 open2,8,2,"graphics file,s,r":input#2,ul$,ur$,ll$,lr$,v$,h$,h2$,h4$,h8$,hs$
160 input#2,s$,s2$,s4$,s8$,ss$,d$,d2$,d4$,d8$:close2
170 open15,8,15:gosub1920
180 open2,8,2,"data file,s,r":input#2,n$:ifn$="a"thenn$="":n=0:rs=-1:goto220
190 n=val(n$):rs=0
200 fori=1ton:input#2,zo$(i),na$(i),ns$(i),ci$(i)
210 input#2,co$(i),pc$(i),ph$(i),g$(i),so$(i):zo%(i)=val(zo$(i)):next
220 gosub1920
230 r=0:q=0:close2
240 print"[147]":ta$=chr$(16)
250 printd4$s8$s4$"[193]ddress [205]anager":print:prints4$s2$ul$hs$h8$h2$ur$
260 prints4$s2$v$" 1 - [195]reate a [206]ew [210]ecord? "v$
270 prints4$s2$v$" 2 - [195]heck and/or [195]hange? "v$
280 prints4$s2$v$" 3 - [208]rintout [193]ll [196]ata? "v$
290 prints4$s2$v$" 4 - [208]rint [208]hone [206]umbers? "v$
300 prints4$s2$v$" 5 - [204]abels and/or [204]ists? "v$
310 prints4$s2$v$" 6 - [209]uit, [211]ort and [211]ave? "v$
320 prints4$s2$ll$hs$h8$h2$lr$
330 printd4$s8$s4$"[211]elect 1 to 6[146] ";
340 open1,0:input#1,m$:close1:m%=val(m$):ifm%<1orm%>6then240
350 onm%goto360,830,730,1660,1230,1730
360 n=n+1:q=q+1:ifn=163thenn=n-1:q=q-1:goto1730
370 print"[147]"d4$s8$s2$s$"[199]eographical [218]one":print:prints8$s4$ul$h8$h4$h$ur$
380 prints8$s4$v$" 1 - [213].[211].[193].? "v$:prints8$s4$v$" 2 - [195]anada? "v$
390 prints8$s4$v$" 3 - [207]thers? "v$:prints8$s4$ll$h8$h4$h$lr$
400 printd2$s8$s2$"[195]hoose 1, 2 or 3[146] ";
410 open1,0:input#1,zo$(n):close1:zo%(n)=val(zo$(n))
420 ifzo%(n)<1orzo%(n)>3then400
430 onzo%(n)goto440,500,570
440 printd2$"[147][197]nter name: ":gosub1970:na$(n)=b$:b$="":print
450 print"[197]nter street address: ":gosub1970:ns$(n)=b$:b$="":print
460 print"[197]nter [195]ity [211]tate and [218][201][208]: ":gosub1970:ci$(n)=b$:b$="":print
470 pc$(n)="":co$(n)="[213].[211].[193]."
480 print"[197]nter phone number.":open1,0:input#1,ph$(n):close1
490 goto640
500 printd2$"[147][197]nter name: ":gosub1970:na$(n)=b$:b$="":print
510 print"[197]nter street address: ":gosub1970:ns$(n)=b$:b$="":print
520 print"[197]nter city and province: ":gosub1970:ci$(n)=b$:b$="":print
530 print"[197]nter postal code.":open1,0:input#1,pc$(n):close1:print
540 ifpc$(n)=""then530
550 co$(n)="[195]anada":print"[197]nter phone number":open1,0:input#1,ph$(n):close1
560 goto640
570 printd2$"[147][197]nter name: ":gosub1970:na$(n)=b$:b$="":print
580 print"[197]nter postal code and city.
590 [153]"(or street and number): ":[141]1970:ns$(n)[178]b$:b$[178]"":[153]
600 [153]"valnter street and number.
610 print"(or postal code and city): ":gosub1970:ci$(n)=b$:b$="":print
620 pc$(n)="":print"[197]nter country: ":gosub1970:co$(n)=b$:b$="":print
630 print"[197]nter phone number.":open1,0:input#1,ph$(n):close1
640 print"[147]":prints8$"[196]o you wish to assign a
650 [153]s4$s2$s$"group code to this record?":[153]s8$s$"right$f so, enter a single
660 prints4$s2$"letter (a to z, lower case)
670 [153]s4$s$s2$"and press (NULL)val(NULL)(NULL)(NULL)(NULL)wait. right$f not,"
680 [153]s8$s2$s$"just press (NULL)val(NULL)(NULL)(NULL)(NULL)wait.
690 open1,0:input#1,g$(n):close1:ifg$(n)=""then240
700 iflen(g$(n))>1then640
710 ifasc(g$(n))<65orasc(g$(n))>90then640
720 goto240
730 open3,4,7:fori=1tonstep3
740 print#3,ta$"04"na$(i)ta$"29"na$(i+1)ta$"54"na$(i+2)
750 print#3,ta$"04"ns$(i)ta$"29"ns$(i+1)ta$"54"ns$(i+2)
760 print#3,ta$"04"ci$(i)ta$"29"ci$(i+1)ta$"54"ci$(i+2)
770 print#3,ta$"04"pc$(i)ta$"29"pc$(i+1)ta$"54"pc$(i+2)
780 print#3,ta$"04"co$(i)ta$"29"co$(i+1)ta$"54"co$(i+2)
790 print#3,ta$"04"ph$(i)ta$"18 [210]ec"i;g$(i)ta$"29"ph$(i+1)ta$"43 [210]ec"i+1;
800 print#3,g$(i+1)ta$"54"ph$(i+2)ta$"68 [210]ec"i+2;g$(i+2):print#3
810 if(i+2)/27=int((i+2)/27)thenprint#3:print#3:print#3
820 next:close3:goto240
830 print"[147]":prints4$s2$s$"[215]hich record number do you
840 [153]s8$s4$s2$"wish to see?":[153]:[153]"(NULL)ecord ";:[159]1,0:[132]1,j:[160]1
850 [139]j[179]1[176]j[177]n[167]830
860 [153]:[153]d2$s$"1-(NULL)one:"zo%(j):[153]s$"(1=(NULL)(NULL)atn,2=lenan,3=(NULL)th)"
870 [153]s$"2-"na$(j):[153]s$"3-"ns$(j)
880 [153]s$"4-"ci$(j):[153]s$"5-"pc$(j):[153]s$"6-"co$(j):[153]s$"7-"ph$(j)
890 [153]s$"8-chr$roup code: "g$(j)
900 [153]:[153]s8$s2$s$"(NULL)hich line do you
910 prints8$s4$"wish to change?"
920 prints8$s4$s2$"(0 if none)":print
930 open1,0:input#1,k$:close1:k%=val(k$):ifk%=0then240
940 ifk%<1ork%>8then900
950 print"[197]nter new information:
960 [145]k%[137]970,990,1070,1080,1090,1100,1110,1120
970 [159]1,0:[132]1,zo%(j):[160]1:[139]zo%(j)[179]1[176]zo%(j)[177]3[167]970
980 [137]1160
990 [159]1,0:[132]1,na$(j):[160]1:q[178]q[170]1:[139]na$(j)[179][177]""[167]1160
1000 [133]"cmdcmd(NULL)ou wish to erase this record (y/n)";y$
1010 [139] [200](y$,1)[179][177]"y"[167]240
1020 [139]n[179]2[175]rs[177][171]1[167][141]2060:[137]240
1030 [153]"valrasing (NULL)ec."j:[129]i[178]1[164]1000:[130]:so$(j)[178]""
1040 [129]c[178]j[164]n:zo%(c)[178]zo%(c[170]1):na$(c)[178]na$(c[170]1):ns$(c)[178]ns$(c[170]1):ci$(c)[178]ci$(c[170]1)
1050 pc$(c)[178]pc$(c[170]1):co$(c)[178]co$(c[170]1):ph$(c)[178]ph$(c[170]1):g$(c)[178]g$(c[170]1)
1060 so$(c)[178]so$(c[170]1):[130]:n[178]n[171]1:[137]240
1070 [141]1970:ns$(j)[178]b$:b$[178]"":[137]1160
1080 [141]1970:ci$(j)[178]b$:b$[178]"":[137]1160
1090 [141]1970:pc$(j)[178]b$:b$[178]"":[137]1160
1100 [141]1970:co$(j)[178]b$:b$[178]"":[137]1160
1110 [159]1,0:[132]1,ph$(j):[160]1:[137]1160
1120 [159]1,0:[132]1,g$(j):[160]1
1130 [139]g$(j)[178]""[167]1160
1140 [139][195](g$(j))[177]1[167]1120
1150 [139][198](g$(j))[179]65[176][198](g$(j))[177]90[167]1120
1160 [153]"load":[153]s8$"str$o you wish to make more
1170 prints8$"changes to this record?
1180 [153]s8$s4$s2$"ywaites or nwaito?";
1190 [161]w$
1200 [139]w$[178]"y"[167]860
1210 [139]w$[178]"n"[167]240
1220 [137]1190
1230 [153]"load"d4$d2$d$
1240 [153]s8$"atnddress (NULL)ists and (NULL)abels":[153]:[153]s8$s$ul$hs$h4$h$ur$
1250 [153]s8$s$v$"1-ascull (NULL)et of (NULL)abels?"v$
1260 [153]s8$s$v$"2-ascull atnddress (NULL)ist?"v$
1270 [153]s8$s$v$"3-(NULL)ne (NULL)abel (NULL)epeated?"v$
1280 [153]s8$s$v$"4-(NULL)abels for a chr$roup?"v$
1290 [153]s8$s$v$"5-chr$roup atnddress (NULL)ist?"v$:[153]s8$s$ll$hs$h4$h$lr$
1300 [153]:[153]s8$s2$"lenhoose: 1,2,3,4 or 5wait ";
1310 [159]1,0:[132]1,l$:[160]1:l%[178][197](l$):[139]l%[179]1[176]l%[177]5[167]1230
1320 dn[178]5:[139]l%[178]2[176]l%[178]5[167]dn[178]4:[137]1370
1330 dn[178]4:[159]14,5,15:[160]14:[139]st[178]0[167]dn[178]5
1340 [153]:[153]" str$o you wish country name printed? (NULL)/(NULL)wait";
1350 [161]yn$:[139]yn$[178]""[167]1350
1360 [139]yn$[179][177]"y"[175]yn$[179][177]"n"[167]1350
1370 [145]l%[137]1450,1450,1480,1560,1560
1380 [152]3,na$(i):[152]3,ns$(i):[152]3,ci$(i)
1390 [139]yn$[178]"n"[167]1940
1400 [145]zo%(i)[137]1410,1420,1430
1410 [152]3,co$(i)ta$"27"i:[152]3:[137]1440
1420 [152]3,pc$(i)ta$"18"co$(i)ta$"27"i:[152]3:[137]1440
1430 [152]3,co$(i)ta$"27"i:[152]3
1440 [152]3:[142]
1450 b[178]0:[159]3,dn,7:[129]i[178]1[164]n:[141]1380
1460 b[178]b[170]1:[139]b[173]10[178][181](b[173]10)[175]l%[178]2[167][129]j[178]1[164]6:[152]3:[130]
1470 [130]:[160]3:[137]240
1480 [153]:[153]s4$"(NULL)hich record do you wish to use?":[159]1,0:[132]1,a$:[160]1
1490 a%[178][197](a$):[139]a%[179]1[176]a%[177]n[167]1480
1500 [153]
1510 [153]s2$"left$ow many copies do you wish t